package com.zhiche.lisa.bms.service.pay.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zhiche.lisa.bms.dao.mapper.pay.PayAffirmDetailMapper;
import com.zhiche.lisa.bms.dao.model.pay.PayAffirmDetail;
import com.zhiche.lisa.bms.service.pay.PayAffirmDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 付款确认明细 服务实现类
 * </p>
 *
 * @author WangShuiJin
 * @since 2018-10-11
 */
@Service
public class PayAffirmDetailServiceImpl extends ServiceImpl<PayAffirmDetailMapper, PayAffirmDetail> implements PayAffirmDetailService {
    @Override
    public void insertPayAffirmDetail(PayAffirmDetail payAffirmDetail) {
        this.insert(payAffirmDetail);
    }

    @Override
    public void deletePayAffirmDetailByHeadId(Long headId) {
        EntityWrapper ew = new EntityWrapper();
        ew.eq("head_id", headId);
        this.delete(ew);
    }

    @Override
    public List<PayAffirmDetail> getPayAffirmDetailByHeadId(Long headId) {
        EntityWrapper ew = new EntityWrapper();
        ew.eq("head_id", headId);
        return this.selectList(ew);
    }
}
